package com.education.service.system;

import com.education.mapper.system.SystemAdminRoleMapper;
import com.education.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author 余一
 * @Description
 * @date 2021/7/10 16:39
 */
@Service
public class SystemAdminRoleService extends BaseService<SystemAdminRoleMapper> {
    @Autowired
    private SystemAdminRoleMapper systemAdminRoleMapper;

    public List<Map> findRoleListByAdminId(Integer adminId){
        return systemAdminRoleMapper.findRoleListByAdminId(adminId);
    }

    public int batchDeleteByIds(List<Integer> ids) {
        return mapper.batchDeleteByIds(ids);
    }

    public int deleteByAdminId(Integer adminId) {
        return mapper.deleteByAdminId(adminId);
    }

    public int batchSave(Map roleMap) {
        return mapper.batchSave(roleMap);
    }

    public List<Map> getRoleIdsByAdminId(Integer adminId) {
        return mapper.findRoleListByAdminId(adminId);
    }
}
